import {User} from "src/models/user";

export class Doctor {
  constructor (doctor) {
    doctor = doctor || {}
    this.user = new User(doctor.user)
    this.main_modality = {
      code: doctor.main_modality.code,
      name: doctor.main_modality.name,
    }
    this.preferred_schedule = doctor.preferred_schedule ?? ''
    this.preferred_shift = doctor.preferred_shift ?? ''
    this.rate_percent = doctor.rate_percent ?? ''
    this.additional_modalities = doctor.additional_modalities
  }
}
